package com.lxh.simplefactory;

public class OperationDiv implements Operation {
    @Override
    public double getResult(double numA, double numB) {
        if (numB == 0) {
            try {
                throw new Exception("除数不能为0");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return numA / numB;
    }
}
